<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jsstudy</title>
</head>
<body>
<div id="div1">
    <p id="intro">hello world!</p>
    <p>下面加一个p元素</p>
</div>

<script>
        //var data={"categories": ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"], "values": [5, 20, 36, 10, 10, 20],"zs":[3,4,5,6,7,8]}
        var data={"\u95e8\u7c7b": ["G", "I", "K", "L", "M", "N", "O", "P", "Q", "R"], "\u95e8\u7c7b\u540d\u79f0": ["\u4ea4\u901a\u8fd0\u8f93\u3001\u4ed3\u50a8\u548c\u90ae\u653f\u4e1a", "\u4fe1\u606f\u4f20\u8f93\u3001\u8f6f\u4ef6\u548c\u4fe1\u606f\u6280\u672f\u670d\u52a1\u4e1a", "\u623f\u5730\u4ea7\u4e1a", "\u79df\u8d41\u548c\u5546\u52a1\u670d\u52a1\u4e1a", "\u79d1\u5b66\u7814\u7a76\u548c\u6280\u672f\u670d\u52a1\u4e1a", "\u6c34\u5229\u3001\u73af\u5883\u548c\u516c\u5171\u8bbe\u65bd\u7ba1\u7406\u4e1a", "\u5c45\u6c11\u670d\u52a1\u3001\u4fee\u7406\u548c\u5176\u4ed6\u670d\u52a1\u4e1a", "\u6559\u80b2", "\u536b\u751f\u548c\u793e\u4f1a\u5de5\u4f5c", "\u6587\u5316\u3001\u4f53\u80b2\u548c\u5a31\u4e50\u4e1a"], "\u5355\u4f4d\u6570": [92, 9, 8, 20, 10, 7, 8, 3, 3, 10], "\u672c\u671f\u8425\u6536": [24297141.0, 3752638.0, 142707.0, 955794.0, 478943.0, 200964.0, 127567.0, 77753.0, 114079.0, 327853.0], "\u4e0a\u671f\u8425\u6536": [11485586.0, 3154885.0, 135787.0, 683884.0, 453900.0, 186184.0, 117875.0, 50729.0, 89705.0, 251309.0], "\u8425\u6536\u589e\u901f": [111.5, 18.9, 5.1, 39.8, 5.5, 7.9, 8.2, 53.3, 27.2, 30.5], "\u8425\u6536\u589e\u91cf": [12811555.0, 597753.0, 6920.0, 271910.0, 25043.0, 14780.0, 9692.0, 27024.0, 24374.0, 76544.0], "\u672c\u671f\u8425\u6536\u5360\u6bd4": [79.7, 12.3, 0.5, 3.1, 1.6, 0.7, 0.4, 0.3, 0.4, 1.1], "\u4e0a\u671f\u8425\u6536\u5360\u6bd4": [69.1, 19.0, 0.8, 4.1, 2.7, 1.1, 0.7, 0.3, 0.5, 1.5], "\u8d21\u732e\u7387": [92.4, 4.3, 0.0, 2.0, 0.2, 0.1, 0.1, 0.2, 0.2, 0.6], "\u62c9\u52a8\u767e\u5206\u70b9": [77.1, 3.6, 0.0, 1.6, 0.2, 0.1, 0.1, 0.2, 0.1, 0.5]};
        var tab=document.createElement("table");
        var element=document.getElementById("div1");
        element.appendChild(tab);

        for(x in data) {
            var tr = document.createElement("tr");
            tab.appendChild(tr);
            var td2=document.createElement("td");
            // 下面三行，加标签
            var field=document.createTextNode(x);
            tr.appendChild(td2);
            td2.appendChild(field);
            for(i in data[x])
            {
                var td1 = document.createElement("td");
                var cont = document.createTextNode(data[x][i]);
                tr.appendChild(td1);
                td1.appendChild(cont);
            }


        }

</script>
</body>
</html>